<?php
/**
 * Created by JetBrains PhpStorm.
 * User: quangvu
 * Date: 5/24/13
 * Time: 1:24 PM
 * To change this template use File | Settings | File Templates.
 */

class TwigService {

    private static $twig = null;

    private function TwigService(){}

    public static function getTwig() {
        if(self::$twig == null ) {
            self::$twig = new Twig_Environment(new Twig_Loader_Filesystem(PATH_VIEWS));
        }
        return self::$twig;
    }

    public static function init() {
        Twig_Autoloader::register();
    }
}